package com.harry.decoupling.defi.module;

import java.util.List;
import java.util.Map;

import org.springframework.data.repository.NoRepositoryBean;

import com.harry.basis.BaseInterface;
import com.harry.basis.BasePoEntity;
import com.harry.utility.query.InnerCriteria;
import com.harry.utility.query.PageCount;

@NoRepositoryBean
public interface GenericDao<T extends BasePoEntity> extends BaseInterface {

	T expandEntityById(String id);

	T saveEntity(T obj);

	void delete(T obj) throws Exception;

	int updateByCriteria(Map<String, Object> contains, InnerCriteria cri) throws Exception;

	int deleteByCriteria(InnerCriteria delCri) throws Exception;

	int countByCriteria(InnerCriteria criteria) throws Exception;

	List<T> query(InnerCriteria criteria, PageCount page) throws Exception;
}
